<template>
  <div>
    <el-pagination
      style="margin-bottom: 20px"
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :current-page="this.page1.page"
      :page-sizes="[10, 20, 30, 50]"
      :page-size="this.page1.pageSize"
      layout="total, sizes, prev, pager, next, jumper"
      :total="total"
    >
    </el-pagination>
  </div>
</template>

<script>
export default {
  data() {
    return {
      page1: this.page,
    };
  },
  props: {
    total: {
      type: Number,
    },
    page: Object,
  },
  methods: {
    handleSizeChange(val) {
      this.$emit("handleSizeChange", val);
    },
    handleCurrentChange(val) {
      this.$emit("handleCurrentChange", val);
    },
  },
};
</script>

<style lang="scss" scoped>
.el-pagination {
  text-align: center;
}
</style>
